package com.tangfh.nacos.demo.consumer.controller;

import com.tangfh.nacos.demo.interfaces.StockService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderController {
    @DubboReference
    private StockService service;

    @GetMapping("/reduceStock")
    public String reduceStock(){
        String result = service.reduceStock();
        return result;
    }
}
